import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

//https://blog.csdn.net/javaonline888/article/details/80235559  透明度
class MyColors {

  static final appColor = HexColor("#00A198");
  static final white = HexColor("#ffffff");
  static final color333333 = HexColor("#333333");
  static final color1A1A1A = HexColor("#1A1A1A");
  static final colorF1F1F1 = HexColor("#F1F1F1");
  static final color999999 = HexColor("#999999");
  static final color00A198 = HexColor("#00A198");
  static final color666666 = HexColor("#666666");
  static final color898989 = HexColor("#898989");
  static final colorE1E1E1 = HexColor("#E1E1E1");
  static final colorE8ECF2 = HexColor("#E8ECF2");
  static final color979797 = HexColor("#979797");
  static final color606B80 = HexColor("#606B80");
  static final colorEE7219 = HexColor("#EE7219");
  static final colorred = HexColor("#FFE57373");
  static final colorF40 = HexColor("#ff4400");
  static final color7BAB12 = HexColor("#7BAB12");
  static final colorE49B17 = HexColor("#E49B17");
  static final color34BAA4 = HexColor("#34BAA4");
  static final color344 = HexColor("#FFF0E6");
  static final color28B6B6 = HexColor("#28B6B6");
  static final color26282D = HexColor("#26282D");

}

class HexColor extends Color {
  static int _getColorFromHex(String hexColor) {
    hexColor = hexColor.toUpperCase().replaceAll("#", "");
    if (hexColor.length == 6) {
      hexColor = "FF$hexColor";
    }
    return int.parse(hexColor, radix: 16);
  }

  HexColor(final String hexColor) : super(_getColorFromHex(hexColor));
}
